package cn.quartz.dbquartz;

import com.alibaba.fastjson.JSON;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @author : zhuqiang
 * @version : V1.0
 * @date : 2016/9/17 13:07
 */
@DisallowConcurrentExecution
public class TestJob implements Job {
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println(JSON.toJSONString(context.getJobDetail().getKey()));
//        System.out.println("-------- 下一次开火时间：" + context.getTrigger().getNextFireTime());
//        System.out.println("-------- 前一次开火时间：" + context.getTrigger().getPreviousFireTime());
//        System.out.println("-------- start时间：" + context.getTrigger().getStartTime());
//        System.out.println("-------- end时间：" + context.getTrigger().getEndTime());
//        System.out.println("-------- FinalFireTime时间：" + context.getTrigger().getFinalFireTime());
//        System.out.println("-------- FireTimeAfter时间：" + context.getTrigger().getFireTimeAfter(new Date()));

    }
}
